package com.yuke.cloud.service.wmc.service.impl;

import com.yuke.cloud.common.core.support.BaseService;
import com.yuke.cloud.service.api.wmc.dto.WarehouseInfoDto;
import com.yuke.cloud.service.wmc.dao.WmsWarehouseGroupMapper;
import com.yuke.cloud.service.wmc.entity.WmsWarehouse;
import com.yuke.cloud.service.wmc.entity.WmsWarehouseGroup;
import com.yuke.cloud.service.wmc.service.WmsWarehouseGroupService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


/**
 * Created by wg on 2018/11/22.
 */
@Service
@Transactional
public class WmsWarehouseGroupServiceImpl extends BaseService<WmsWarehouseGroup> implements WmsWarehouseGroupService {
    @Resource
    private WmsWarehouseGroupMapper wmsWarehouseGroupMapper;

    @Override
    public Long findGroupId(Long aLong) {
        Long id=wmsWarehouseGroupMapper.findGroupId(aLong);
        return id;
    }

    @Override
    public List<Map> findgroupid2(List<WmsWarehouse> wmsWarehouses) {
        return wmsWarehouseGroupMapper.findgroupid2(wmsWarehouses);
    }

    @Override
    public void batchDeletebywarehouseids(List<Long> ids) {
        wmsWarehouseGroupMapper.batchDeletebywarehouseids(ids);
    }

    @Override
    public List<Map> findwarehouseandaddress(List<WmsWarehouse> wmsWarehouses) {
        return wmsWarehouseGroupMapper.findwarehouseandaddress(wmsWarehouses);
    }

    @Override
    public List<WarehouseInfoDto> getWarehouseInfoByGroupId(Long groupId) {
        return wmsWarehouseGroupMapper.getWarehouseInfoByGroupId(groupId);
    }
}
